package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IPayResultModel;
import com.wgts.wgts.mvp.model.imp.PayResultModel;
import com.wgts.wgts.mvp.presenter.IPayResultPresenter;
import com.wgts.wgts.mvp.presenter.imp.PayResultPresenter;
import com.wgts.wgts.mvp.view.IPayResultView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/2213:49
 *
 */
@Module
public class PayResultModule {
    private IPayResultView view;

    public PayResultModule(IPayResultView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IPayResultView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IPayResultModel provideModel(NetService netService){
        return new PayResultModel(netService);
    }

    @ActivityScope
    @Provides
    public IPayResultPresenter providePresenter(IPayResultView view, IPayResultModel model){
        return new PayResultPresenter(view, model);
    }
}
